// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 添加成果 POST /awards/add */
export async function postAwardsAdd(
  body: API.AddAwardDTO,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseAwards>('/awards/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 审批成果 POST /awards/approve */
export async function postAwardsApprove(
  body: API.ApproveAwardDTO,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseAwards>('/awards/approve', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除成果 GET /awards/delete */
export async function getAwardsOpenApiDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getAwards_openAPI_deleteParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean>('/awards/delete', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 获取成果详情 GET /awards/detail */
export async function getAwardsDetail(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getAwardsDetailParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseAwardDetailVO>('/awards/detail', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 获取成果列表(根据身份获取不同数据) POST /awards/list */
export async function postAwardsList(
  body: API.GetAwardPageDTO,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageVOAwards>('/awards/list', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 修改成果 POST /awards/update */
export async function postAwardsUpdate(
  body: API.UpdateAwardDTO,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseAwards>('/awards/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
